package com.jt.www.enums.woxuebao;

import org.apache.commons.lang.StringUtils;

/**
 * @author admin_ltf
 * @create 2019-06-02 9:13
 */
public enum YNXPXProgramCodeEnum {


    code1("19PR896371", "19XZ734571", "19FA889093"),
    code2("19PR896371", "19XZ643399", "19FA595786");

    private String productcode;
    private String type;
    private String code;

    YNXPXProgramCodeEnum(String productcode, String type, String code) {
        this.productcode = productcode;
        this.type = type;
        this.code = code;
    }

    public static String getProgramCode(String productcode, String type) {
        String code = "";
        if (StringUtils.isEmpty(productcode) || StringUtils.isEmpty(type)) {
            return code;
        }
        for (YNXPXProgramCodeEnum hTCXCZProgramCodeEnum : YNXPXProgramCodeEnum.values()) {
            if (hTCXCZProgramCodeEnum.productcode.equals(productcode) && hTCXCZProgramCodeEnum.type.equals(type)) {
                code = hTCXCZProgramCodeEnum.code;
                break;
            }
        }

        return code;

    }

    public String getProductcode() {
        return productcode;
    }

    public String getType() {
        return type;
    }

    public String getCode() {
        return code;
    }
}
